<?php

namespace app\model\user;

use think\Model;

/**
 * t_member_balance_log 用户余额变动记录
 * @property integer $id id(主键)
 * @property integer $type 方式 1=充值 2=下单
 * @property integer $member_id 用户id
 * @property string $balance 变动余额
 * @property string $before 变前余额
 * @property integer $order_id 关联的订单id
 * @property string $order_no 订单号
 * @property string $remark 变动事由
 * @property string $created_at 创建时间
 * @property string $updated_at 更新时间
 */
class UserBalanceLog extends Model
{
    /**
     * The connection name for the model.
     *
     * @var string|null
     */
    protected $connection = 'mysql';

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 't_user_balance_log';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $pk = 'id';

    const TYPE_RECHARGE =1; //1=充值 
    const TYPE_ORDER =2; //2=下单

}
